package com.hx.setting.model;

import com.hx.setting.model.Users2groupModel.Users2groupTableField;

/**
 * -- ==== --
 * CREATE TABLE `hx_users2group` (
 * `id` bigint(20) NOT NULL COMMENT '主键',
 * `user_id` bigint(20) NOT NULL COMMENT '用户外键  fk:hx_users:id',
 * `group_id` bigint(20) NOT NULL COMMENT '用户组外键 fk:hx_groups:id',
 * PRIMARY KEY (`id`)
 * ) ENGINE=InnoDB DEFAULT CHARSET=utf8
 * -- ==== --
 * Generate Date : 2014-03-16
 * Generate Version : v3.0
 * Generate Name : Honey v3.1 Test
 * Generate User : THINK
 * JDK Version : 1.5
 */
public final class Users2groupModel extends GeneratedCriteria<Users2groupModel, Users2groupTableField>
{

	public static final String	TABLE_NAME		= "hx_users2group";

	public static final String	DATABASE_VENDOR	= "Mysql-5.5";

	/**
	 * 
	 * 数据库字段枚举
	 */
	public enum Users2groupTableField implements TableField
	{
		/** 
		 * 主键
		 */
		ID( new String[]
		{ "id", "id", "主键 " } ),
		/** 
		 * 用户外键
		 */
		USERID( new String[]
		{ "user_id", "userId", "用户外键 " } ),
		/** 
		 * 用户组外键
		 */
		GROUPID( new String[]
		{ "group_id", "groupId", "用户组外键 " } );

		/** 数据库字段名称 */
		private final String	value;

		/** 映射到java属性名称 */
		private final String	property;

		/** 数据库字段注释 */
		private final String	show;

		/** 
		 * 
		 * @param  value {@code   String}
		 * 
		 * @see    String
		 */
		private Users2groupTableField(String args[])
		{
			this.value = args[0];
			this.property = args[1];
			this.show = args[2];
		}

		public static final Users2groupTableField getInstance(String property)
		{
			Users2groupTableField answer = null;
			if ( property != null )
			{
				int hash = property.hashCode();
				switch ( hash )
				{
					case 3355 : //id,主键 
						answer = ID;
						break;
					case -836030906 : //userId,用户外键 
						answer = USERID;
						break;
					case 293428218 : //groupId,用户组外键 
						answer = GROUPID;
						break;
				}
			}
			return answer;
		}

		/** 
		 * 获取数据库字段名称
		 * 
		 * @return {@code  Short}
		 */
		@Override
		public final String getValue()
		{
			return this.value;
		}

		/** 
		 * 获取映射对象属性名称
		 * 
		 * @return {@code  Short}
		 */
		@Override
		public final String getProperty()
		{
			return this.property;
		}

		/** 
		 * 获取字段显示名称(数据库字段注释)
		 * 
		 * @return {@code  String}
		 */
		@Override
		public final String getShow()
		{
			return this.show;
		}

		/** 
		 * 
		 * @return {@code  String}
		 */
		@Override
		public String toString()
		{
			return this.value;
		}
	}
}
/* Honey v3.1 Test - version:4 - OriginalChecksum:B0dacf3691850b4d7b16247250139aadf (do not edit this line) */
